home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
prolog
/
sbprolog
/
amiga
/
v3_1
/
sbp3_1e.lzh
/
BICOND.PL
< prev
next >
Wrap
Text File
|
1991-10-31
|
666b
|
32 lines
/* From the book PROLOG PROGRAMMING IN DEPTH
by Michael A. Covington, Donald Nute, and Andre Vellino.
Copyright 1988 Scott, Foresman & Co.
Non-commercial distribution of this file is permitted. */
/* BICOND.PL */
/* Extension of Prolog to handle
certain biconditionals */
/* The -:- operator joins the two
sides of a biconditional rule. */
:- op(950,xfx,'-:-').
/* Inference engine for biconditionals */
prove(Goal) :- call(Goal).
prove(GoalA) :- (GoalA -:- GoalB),
call(GoalB).
prove(GoalB) :- (GoalA -:- GoalB),
call(GoalA).
/* Sample knowledge base */
dog(fido).
canine(rolf).
dog(X) -:- canine(X).